#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
using namespace std;
typedef long long ll;
ll a, b, c;
ll dp[25][25][25];
ll w(ll a, ll b, ll c) 
{
	if (a <= 0 || b <= 0 || c <= 0)return 1;
	if (a > 20 || b > 20 || c > 20)return w(20, 20, 20);
	//if (a > 20 || b > 20 || c > 20)return 1048576;
	if (a < b && b < c)
	{
		if (dp[a][b][c - 1] == 0)
		{
			dp[a][b][c - 1] = w(a, b, c - 1);
		}
		if (dp[a][b - 1][c - 1] == 0)
		{
			dp[a][b - 1][c - 1] = w(a, b - 1, c - 1);
		}
		if (dp[a][b - 1][c] == 0)
		{
			dp[a][b - 1][c] = w(a, b - 1, c);
		}
		dp[a][b][c] = dp[a][b][c - 1] + dp[a][b - 1][c - 1] - dp[a][b - 1][c];
	}

	else
	{
		if (dp[a - 1][b][c] == 0)
		{
			dp[a - 1][b][c] = w(a - 1, b, c);
		}
		if (dp[a - 1][b - 1][c] == 0)
		{
			dp[a - 1][b - 1][c] = w(a - 1, b - 1, c);
		}
		if (dp[a - 1][b][c - 1] == 0)
		{
			dp[a - 1][b][c - 1] = w(a - 1, b, c - 1);
		}
		if (dp[a - 1][b - 1][c - 1] == 0)
		{
			dp[a - 1][b - 1][c - 1] = w(a - 1, b - 1, c - 1);
		}
		dp[a][b][c] = dp[a - 1][b][c] + dp[a - 1][b][c - 1] + dp[a - 1][b - 1][c] - dp[a - 1][b - 1][c - 1];
	}

	return dp[a][b][c];
}
int main()
{
	while (scanf("%lld%lld%lld", &a, &b, &c)) {
		if (a == -1 && b == -1 && c == -1)return 0;
		printf("w(%lld, %lld, %lld) = ", a, b, c);
		printf("%lld\n", w(a, b, c));
	}
}


//#define _CRT_SECURE_NO_WARNINGS
//#include<iostream>
//using namespace std;
//typedef long long ll;
//ll a, b, c;
//ll arr[25][25][25];
//ll w(ll a, ll b, ll c)
//{
//	if (a <= 0 || b <= 0 || c <= 0)return 1;
//	if (a > 20 || b > 20 || c > 20)return w(20, 20, 20);
//	//if (a > 20 || b > 20 || c > 20)return 1048576;
//	if (a < b && b < c) {
//		if (arr[a][b][c - 1] == 0) {
//			arr[a][b][c - 1] = w(a, b, c - 1);
//		}
//		if (arr[a][b - 1][c - 1] == 0) {
//			arr[a][b - 1][c - 1] = w(a, b - 1, c - 1);
//		}
//		if (arr[a][b - 1][c] == 0) {
//			arr[a][b - 1][c] = w(a, b - 1, c);
//		}
//		arr[a][b][c] = arr[a][b][c - 1] + arr[a][b - 1][c - 1] - arr[a][b - 1][c];
//	}
//	else {
//		if (arr[a - 1][b][c] == 0) {
//			arr[a - 1][b][c] = w(a - 1, b, c);
//		}
//		if (arr[a - 1, b - 1, c] == 0) {
//			arr[a - 1][b - 1][c] = w(a - 1, b - 1, c);
//		}
//		if (arr[a - 1][b][c - 1] == 0) {
//			arr[a - 1][b][c - 1] == w(a - 1, b, c - 1);
//		}
//		if (arr[a - 1][b - 1][c - 1] == 0) {
//			arr[a - 1][b - 1][c - 1] = w(a - 1, b - 1, c - 1);
//		}
//		arr[a][b][c] = w(a - 1, b, c) + w(a - 1, b - 1, c) + w(a - 1, b, c - 1) - w(a - 1, b - 1, c - 1);
//	}
//	return arr[a][b][c];
//}
//int main()
//{
//	while (scanf("%lld%lld%lld", &a, &b, &c)) {
//		if (a == -1 && b == -1 && c == -1)return 0;
//		printf("w(%lld, %lld, %lld) = ", a, b, c);
//		printf("%lld\n", w(a, b, c));
//	}
//}
//#include<stdio.h>
//typedef long long ll;
//int arr[25][25][25];
//ll a, b, c;
//int w(int a,int b,int c)
//{
//	if (a <= 0 || b <= 0 || c <= 0)return 1;
//	else if (a == 20 && b == 20 && c == 20) {
//		if (arr[a][b][c])return arr[a][b][c];
//		else return arr[a][b][c] = w(20, 20, 20);
//	}
//	else if (a < b && b < c) {
//		if (arr[a][b][c])return arr[a][b][c];
//		else return arr[a][b][c] = w(a, b, c - 1) + w(a, b - 1, c - 1) - w(a, b - 1, c);
//	}
//	else {
//		if (arr[a][b][c])return arr[a][b][c];
//		else {
//			return arr[a][b][c] = w(a - 1, b, c) + w(a - 1, b - 1, c) +
//				w(a - 1, b, c - 1) -
//				w(a - 1, b - 1, c - 1);
//		}
//	}
//}
//int main()
//{
//	while (scanf("%lld%lld%lld", &a, &b, &c)) {
//		if (a == -1 && b == -1 && c == -1)break;
//		printf("w(%lld, %lld, %lld) = ", a, b, c);
//		if (a > 20)a = 20;
//		if (b > 20)b = 20;
//		if (c > 20)c = 20;
//		printf("%d\n", w(a, b, c));
//	}
//	return 0;
//}